<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 

<%@page import="jml.config.LabelGroups"%>
<%@page import="jml.defaultimple.Sublabel"%>
<%@page import="jml.defaultimple.web.WebFacade"%>
<%@page import="jml.def.Title"%> 
<%@page import="jml.def.Label"%>
<%@page import="jml.def.Filter"%>
<%@page import="jml.def.Library"%>
<%@page import="java.net.URLEncoder"%>    

<html>  
	<jsp:include page="zHead.jsp" />
<%
	// obtengo la libreria de discos
	Library library = (Library)application.getAttribute("library");
%>

<body>  


<div id="header">     
	<div id="buttons">
		<button id="closeAll">Close All</button>
		<button id="about">About</button>
		<button id="refresh">Refresh</button>
		<button id="add_tab">Add Filter</button>
	</div>
</div>

<div id="dialog" title="Filters">
	<form>
	    <fieldset class="ui-helper-reset">
	        <label>Availables Filters</label>
	        <select name="tab_title" id="tab_title" class="ui-widget-content ui-corner-all"></select>
	    </fieldset> 
	</form>
</div>
    
<div id="dialogAbout" title="About">
	<jsp:include page="zAbout.jsp" />
</div>

<div id="InfoContent"> 
	<form id="jmlForm" action="">    
    <div id="contentTabs">
 		<ul id="tabsMenu">
<%
		// obtengo los filtros
		Filter[] filters = library.getFilters();	
		String hidden="";
	
		// itero los filtros para las solapas
		for(int i=0; i<filters.length; i++)
		{
			hidden = !filters[i].isAlwaysShown()?"style=\"display: none;\"":"";
%>
	  		<li <%=hidden%>><a href="#<%=filters[i].getName()%>"><%=filters[i].getName()%></a> <span class="ui-icon ui-icon-close">Remove Tab</span></li>
<%
		}
%>
		</ul>
<%
		//itero x filter para los titulos
		for(int i=0; i<filters.length; i++)
		{
%>
			<div id="<%=filters[i].getName()%>">
<%
			// obtengo los labels de este filter
			Label[] labels=filters[i].getLabels();
	
			for(Label label:labels)
			{ 			
%>
				<jsp:include page="zShowLabel.jsp">
					<jsp:param name="filterName" value="<%=filters[i].getName()%>" />
					<jsp:param name="labelName" value="<%=label.getName()%>" />					
				</jsp:include>
<%
			}
			
%>
			</div>
<%
		}
%>		
	</div>
	</form>  
</div>


</body>
</html>